1. Field of the Invention
The present invention relates to a technique for generating an image of a virtual space according to a ray tracing method.
2. Description of the Related Art
An MR (Mixed Reality) technique is known. By superposing a computer graphics (CG) image onto a captured scenery as a background, and presenting the superposed image to the user, this technique allows the user to experience an environment as if a virtual object were existing at that place.
Conventionally, a system that combines the MR technique and ray tracing technique has been proposed (non-patent reference 1). In a rendering system disclosed in non-patent reference 1, an MR image is generated in such a manner that a virtual object is superposed on a captured image as a background, which is acquired as a video image, by rendering that virtual object by a ray tracing method. An example of rendering using this system expresses a state in which a CG sphere as a virtual object casts a shadow over a floor as a physical object. In order to realize such expression, a virtual object that expresses the floor as the physical object is defined. Then, an image of the shadow cast over this virtual object corresponding to the floor is generated, and is composited with an image of the physical floor.
Also, a method of expressing correct depth ordering between a virtual object and physical object on an MR space by laying out a virtual object that expresses a physical object on an MR space based on the sensing result of the position and orientation of the physical object has been proposed (patent reference 1).
[Non-patent Reference 1] Interactive Mixed Reality Rendering in a Distributed Ray Tracing Framework, Andreas Pomi, and Philipp Slusallek, IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR) 2004, Student Colloquim, Arlington, USA, Nov. 2-5, 2004
[Patent Reference 1] Japanese Patent Laid-Open No. 2005-293142
In general, one uses a shadow and image of reflection as clues upon recognizing the positional relationship between objects from visual information. Therefore, even in case of MR, in order to allow the user to correctly recognize the positional relationship between objects, it is indispensable to correctly express a shadow and reflection. In this case, not only a shadow and reflection from a virtual object to another virtual object, but also those from a physical object to a virtual object have to be correctly expressed.
In non-patent reference 1, a shadow which is cast from a virtual object over another virtual object (expressed as a transparent object) that expresses a floor as a physical object is rendered. Assume that there are two virtual objects which express physical objects, and have the relationship in that one casts a shadow over the other. An image of the shadow in this case appears in an image obtained by capturing a physical space. Therefore, the image of the shadow need not be generated anew by rendering the virtual objects. However, since non-patent reference 1 does not consider this case, an image of an unwanted shadow is generated in addition to the shadow in the captured image. This problem may also be posed when a shadow (self shadow) is generated inside a virtual object that expresses one physical object. Furthermore, in non-patent reference 1, a reflection cannot be correctly expressed as in the shadow.